package com.dmz.workflow.service;


import com.dmz.workflow.req.BranchPredictionReq;
import com.dmz.workflow.req.ChitchatReq;
import com.dmz.workflow.req.ProcessDefinitionReq;
import com.dmz.workflow.vo.IntermediateNodeVo;
import com.echronos.commons.Result;
import com.echronos.imc.api.resp.ImcSessionResp;
import com.dmz.workflow.vo.TaskFormVo;
import org.flowable.engine.repository.ProcessDefinition;

import java.util.List;

public interface ProcessDefinitionService {

    /**
     * 查询单一流程定义
     */
    ProcessDefinition getProcessDefinitionById(String processDefinitionId);

    /**
     * 激活流程定义
     */
    void activate(ProcessDefinitionReq actionRequest);

    /**
     * 挂起流程定义
     */
    void suspend(ProcessDefinitionReq actionRequest);

    /**
     * 创建群聊
     */
    Result<?> createChitchat(ChitchatReq chitchatReq);

    /**
     * 查询流程定义信息详情
     */
    Result<List<IntermediateNodeVo>> userInputByValue(BranchPredictionReq branchPredictionReq);

    /**
     * 查询任务的表单和在流程中使用到的流程条件
     * @param processDefinitionId 流程定义ID
     * @return 任务表单和流程使用到的条件
     */
    Result<TaskFormVo> queryTaskFormAndUsedConditions(String processDefinitionId);
}
